﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using UngdungComponent.DAL;

namespace UngdungComponent.BLL
{
    public class Ungdung:IUngdung
    {
        #region properties
        public UngdungDAL _ungdungDAL;
        private int _ung_dung_id;

        public int Ung_dung_id
        {
            get { return _ung_dung_id; }
            set { _ung_dung_id = value; }
        }

        private string _ma;

        public string Ma
        {
            get { return _ma; }
            set { _ma = value; }
        }
        private string _ten;

        public string Ten
        {
            get { return _ten; }
            set { _ten = value; }
        }
        
        private string _mieuta;

        public string Mieuta
        {
            get { return _mieuta; }
            set { _mieuta = value; }
        }
        private string _icon;

        public string Icon
        {
            get { return _icon; }
            set { _icon = value; }
        }

        private string _bundle_id;

        public string Bundle_id
        {
            get { return _bundle_id; }
            set { _bundle_id = value; }
        }

        private int _trangthai;

        public int Trangthai
        {
            get { return _trangthai; }
            set { _trangthai = value; }
        }

        private string _ngaytao;

        public string Ngaytao
        {
            get { return _ngaytao; }
            set { _ngaytao = value; }
        }

        private string _nguoitao;

        public string Nguoitao
        {
            get { return _nguoitao; }
            set { _nguoitao = value; }
        }

        private string _ngayduyet;

        public string Ngayduyet
        {
            get { return _ngayduyet; }
            set { _ngayduyet = value; }
        }

        private string _nguoiduyet;

        public string Nguoiduyet
        {
            get { return _nguoiduyet; }
            set { _nguoiduyet = value; }
        }
        
        #endregion

        #region method
        public Ungdung()
        {
            _ungdungDAL = new UngdungDAL();
        }
        public void Get()
        {
            _ungdungDAL.Get(this);
        }
        public int Add()
        {
            return _ungdungDAL.Add(this);
        }
        public void Delete()
        {
            _ungdungDAL.Delete(this);
        }
        public void Update()
        {
            _ungdungDAL.Update(this);
        }
        public List<Ungdung> GetAll(int currentPage, int pageSize, out int total, string ten, string column_sort, string type_sort)
        {
            return _ungdungDAL.GetAll(currentPage, pageSize, out total, ten, column_sort, type_sort);
        }
        #endregion
    }
}
